from urllib import request


class proxy:
    def __init__(self):
        proxy_handler = request.ProxyHandler({'http': 'http://127.0.0.1:8087'})
        proxy_auth_handler = request.ProxyBasicAuthHandler()
        self.opener = request.build_opener(proxy_handler, proxy_auth_handler)

    def get_opener(self):
        return self.opener
